'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/home', controller.home.home);
  router.post('/add', controller.home.add);
  router.post('/edit', controller.home.edit);
  router.post('/del', controller.home.del);
  router.post('/view', controller.home.view);
  router.post('/new', controller.nn.newContext);
  router.post('/token', controller.nn.getToken);
  router.get('/res', controller.nn.newResponse);

  // 数据库操作
  router.get('/addmanage', controller.crud.selInfo);
  router.get('/delmanage', controller.crud.delInfo);
  router.get('/updatemanage', controller.crud.updateInfo);
  router.get('/getmanage', controller.crud.getInfo);

};
